tool item group: Don't leak a button
authorMatthias Clasen <mclasen@redhat.com>
Tue, 27 Oct 2015 15:07:53 +0000 (11:07 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Tue, 27 Oct 2015 15:09:00 +0000 (11:09 -0400)
This causes a hickup in the new css node machinery, causing
the default-value test to fail.

gtk/gtktoolitemgroup.c

index 719ccff23dacbb0241b0f9450c5d7a8c5b4937ed..6d783788dc560e2ab0336f5aa86310f71882bcb8 100644 (file)
@@ -495,11 +495,7 @@ gtk_tool_item_group_finalize (GObject *object)
 {
   GtkToolItemGroup *group = GTK_TOOL_ITEM_GROUP (object);
 
-  if (group->priv->children)
-    {
-      g_list_free (group->priv->children);
-      group->priv->children = NULL;
-    }
+  g_list_free (group->priv->children);
 
   G_OBJECT_CLASS (gtk_tool_item_group_parent_class)->finalize (object);
 }
@@ -527,6 +523,8 @@ gtk_tool_item_group_dispose (GObject *object)
     }
 
   g_clear_object (&priv->settings);
+  gtk_widget_destroy (priv->header);
+  g_clear_object (&priv->header);
 
   G_OBJECT_CLASS (gtk_tool_item_group_parent_class)->dispose (object);
 }